/*
 * UserLogin.java
 * Copyright (c) 2014, 2019, Kiri. 
 * All rights reserved.
 */
package com.onesalt.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;

/**
 * 用户登录
 *
 * @author kiri
 * @date 2015年4月8日
 * @version 1.0
 */
@Entity(name = "t_user_login")
public class UserLogin implements Serializable {

	private static final long serialVersionUID = 8465065793611453778L;

	public static class LoginType {
		public static final int WEB = 1;
		public static final int MOBILE = 2;
		public static final int WECHAT = 3;
		public static final int SINA_WEIBO = 4;
	}

	@Id
	@GeneratedValue
	private Long loginId;

	private Long userId;

	private int loginType;
	
	private String deviceId;
	
	private String client;
	
	private String version;

	private Date lastOpenAppTime;

	private String sessionId;

	private String token;

	private Date loginTime;

	private Date modifyTime;

	private Date createTime;

	public Long getLoginId() {
		return loginId;
	}

	public void setLoginId(long loginId) {
		this.loginId = loginId;
	}

	public Date getLastOpenAppTime() {
		return lastOpenAppTime;
	}

	public void setLastOpenAppTime(Date lastOpenAppTime) {
		this.lastOpenAppTime = lastOpenAppTime;
	}

	public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getLoginTime() {
		return loginTime;
	}

	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}

	public String getClient() {
		return client;
	}

	public void setClient(String client) {
		this.client = client;
	}

	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}

	public String getToken() {
		return token;
	}

	public void setToken(String token) {
		this.token = token;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public int getLoginType() {
		return loginType;
	}

	public void setLoginType(int loginType) {
		this.loginType = loginType;
	}
}
